import request from '@/utils/request'

/**
* 零件批次管理分页查询
* @param {查询条件} data
*/
export function listCksBatchofpart(query) {
  return request({
    url: 'business/CksBatchofpart/list',
    method: 'get',
    params: query,
  })
}

/**
* 新增零件批次管理
* @param data
*/
export function addCksBatchofpart(data) {
  return request({
    url: 'business/CksBatchofpart',
    method: 'post',
    data: data,
  })
}
/**
* 修改零件批次管理
* @param data
*/
export function updateCksBatchofpart(data) {
  return request({
    url: 'business/CksBatchofpart',
    method: 'PUT',
    data: data,
  })
}
/**
* 获取零件批次管理详情
* @param {Id}
*/
export function getCksBatchofpart(id) {
  return request({
    url: 'business/CksBatchofpart/' + id,
    method: 'get'
  })
}

/**
* 删除零件批次管理
* @param {主键} pid
*/
export function delCksBatchofpart(pid) {
  return request({
    url: 'business/CksBatchofpart/delete/' + pid,
    method: 'delete'
  })
}
/**
* 变更当前批次状态完结
* @param data
*/
export function endbatch(data) {
  return request({
    url: 'business/CksBatchofpart/endbatch',
    method: 'post',
    data: data,
  })
}